import _ from 'lodash'
import currency from './currency'
import formatDate from './datetime'
import capitalize from './capitalize'
import uppercase from './uppercase'
import lowercase from './lowercase'
import placeholder from './placeholder'
import truncate from './truncate'

let filters = {
  currency,
  formatDate,
  capitalize,
  uppercase,
  lowercase,
  placeholder,
  truncate
}

function install (Vue) {
  _.forEach(filters, function (value, key) {
    Vue.filter(key, value)
  })
}

export default install
